'''
考勤统计页面测试
'''
from Lib.base.keywords import KeyWords
from selenium.webdriver.common.by import By
from Lib.common.common_function import *
from Lib.base.page_object.login_page import LonginPage


class BusinessCase(KeyWords):
    # 新增商户页面
    url = KeyWords.url + 'business/events'

    # 新建商户
    def business_case_list(self):
        data = get_data_by_yaml(get_path() + r'\Data\element_data\business\business_case.yaml')
        element_operation(self, data[0]['data'])

    def business_case_search_sort(self):
        data = get_data_by_yaml(get_path() + r'\Data\element_data\business\business_case_sort.yaml')
        element_operation(self, data[0]['data'])


if __name__ == '__main__':
    driver = choose_browser()
    L = LonginPage(driver)
    L.login('kobeAdmin002', 'kobe8888')
    case = BusinessCase(driver)
    case.business_case_search_sort()
    driver.quit()
